export const formComponentConfig = {
  inputModal: () => import('@/common/components/search-modal/input-modal.vue'),
  dictSelect: () => import('@/common/components/dict-select/index.vue'),
};

export const formRenderConfig = {
  checkTaskNo: {
    label: '检验申请单号',
    field: 'checkTaskNo',
    componentName: 'input',
    componentProps: {},
  },
  mdsVendorName: {
    label: '供应商',
    field: 'mdsVendorName',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商',
      type: 'supplyName',
      labelName: 'supplierChinese',
      valueName: 'supplierChinese',
    },
  },
  mdsItemId: {
    label: '物料编码',
    // field: 'mdsItemId',
    field: 'mdsItemCode',
    componentName: 'inputModal',
    componentProps: {
      title: '物料编码',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
    },
  },
  marque: {
    label: '型号',
    field: 'marque',
    componentName: 'inputModal',
    componentProps: {
      title: '型号',
      type: 'materialCode',
      labelName: 'modelMark',
      valueName: 'modelMark',
    },
  },
  parentItemSerialNo: {
    label: '父型号',
    // field: 'parentItemSerialNo',
    field: 'parentModelCode',
    componentName: 'input',
  },
  proMdsItemId: {
    label: '机型',
    // field: 'proMdsItemId',
    field: 'materialName',
    componentName: 'inputModal',
    componentProps: {
      title: '机型/产品',
      type: 'materialCode',
      labelName: 'materialName',
      valueName: 'materialCode',
      defaultQuery: {
        materialType: '6',
        materialStatus: '1,3',
      },
    },
  },
  billStatus: {
    label: '状态',
    field: 'billStatus',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '检验中', value: '5' },
        { label: '检验完成', value: '13' },
        { label: '已入库', value: '30' },
      ],
    },
    // componentName: 'dictSelect',
    // componentProps: {
    //   dictType: 'checkBillStatus',
    // },
  },
  status: {
    label: '状态',
    field: 'status',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '待送检', value: '0' },
        { label: '检验退回', value: '20' },
      ],
    },
  },
  prtlotNo: {
    label: '质量编号',
    field: 'prtlotNo',
    componentName: 'input',
  },
  receiveType: {
    label: '到货类型',
    field: 'receiveType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'receiveType',
    },
  },
  planSourceType: {
    label: '需求来源',
    field: 'planSourceType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'requireSourceType',
    },
  },
  marques: {
    label: '牌号',
    field: 'marque',
    componentName: 'inputModal',
    componentProps: {
      title: '机型/产品',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
    },
  },
  specs: {
    label: '规格',
    field: 'specs',
    componentName: 'inputModal',
    componentProps: {
      title: '机型/产品',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
    },
  },
  name13: {
    label: '工艺状态号',
    field: 'processStatusNo',
    componentName: 'input',
  },
  name14: {
    label: '零部件版本号',
    field: 'mdsItemVersionNo',
    componentName: 'input',
  },
  name15: {
    label: '订单号',
    field: 'orderNo',
    componentName: 'input',
  },
  ynAmmunition: {
    label: '是否火工品',
    field: 'ynAmmunition',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'YN',
    },
  },
};
